#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
@Project ：Employment_class 
@File    ：04_接收数据.py
@IDE     ：PyCharm 
@Author  ：XiaoDengYa
@Date    ：2021/6/18/018 21:18 
"""

from socket import *

udpSocket = socket(AF_INET, SOCK_DGRAM)

udpSocket.bind(("", 7788))

infoData = udpSocket.recvfrom(1024)

content,destInfo = infoData

print("infodata:{}".format(content.decode("gb2312")))
